//路由懒加载
const Backstage = ()=>import('../views/Backstage')
const Category = ()=>import('../views/Category')
const ArticleTitle = ()=>import('../views/ArticleTitle')
const ArticleEdit = ()=>import('../views/ArticleEdit')
const ArticleList = ()=>import('../views/ArticleList')
export default [
  {
    path: '/',
    redirect:{name:'Backstage'}
  },
  {
    path:'/login',
    name:'Login',
    component:()=>import('../views/Login'),
    meta:{
      title:"管理员登录"
    }
  },
  {
    path:'/backstage',
    name:'Backstage',
    component:Backstage,
    meta:{
      title:"后台管理系统",
      requiresAuth: true
    },
    children:[
      {
        path:'category',
        component:Category,
        meta:{
          title:'分类管理'
        }
      },
      {
        path:'article/title',
        component:ArticleTitle,
        meta:{
          title:'文章分类管理'
        }
      },
      {
        path:'article/edit',
        component:ArticleEdit,
        meta:{
          title:'编辑文章'
        }
      },
      {
        path:'article/list',
        component:ArticleList,
        meta:{
          title:'文章列表'
        }
      }
    ]
  }
]

